package cn.ustb.dao;
import cn.ustb.entity.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


/**
 * @author ljy
 */
public interface UserDao {
    /**
     * fetch data by username
     * @param  username username
     * @return User
     */
    @Select("select * from users where username = #{username}")
    User get(String username);

    /**
     * update data by username
     * @param  user user
     */
    @Update("update users set password = #{password} where username = #{username}")
    void update(User user);
}
